Or am I missing something?

* Create a new project on Windows.

* Add a button to the window.

* In the Action event, put the following code:

 Dim File As FolderItem
 Dim p As Picture
 File = GetOpenFolderItem("any")

 While File <> nil
   p = File.OpenAsPicture
   p = nil
   File = GetOpenFolderItem("any")
 Wend

Open Task Manager so you can watch the memory of your application, and run
it (debugger or compiled). Click the button and open a few pictures. Watch
the memory.

I can pretty quickly get mine up to the half gig range opening tiffs and
jpegs from my digital camera. Past that my machine starts to get sluggish as
I only have 1 GB of RAM on my PC.

Am I missing a step, or is there a major memory leak opening a picture from
a file on Windows? I don't want to report it without some confirmation as
I'm guilty of reporting a few bugs recently where I had overlooked
something.

My Mac does not show the same behavior. It recovers the used memory and
therefore never grows past a certain point.

Daniel L. Taylor
Taylor Design
Computer Consulting & Software Development
[EMAIL PROTECTED]
www.taylor-design.com


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, November 09, 2006 10:00 AM
Subject: realbasic-nug Digest, Vol 32, Issue 19


When replying to digests:
- edit your Subject line - be specific!
- quote only the message parts you need to


Today's Topics:

  1. RTF on OS X (Bruce Moore)
  2. Re: RTF on OS X (Bart Pietercil)
  3. Re: updating canvas properties (Frank Bitterlich)
  4. Re: RTF on OS X (Frank Bitterlich)
  5. Re: RTF on OS X (Bart Pietercil)
  6. Re: Request for new keywords and features to handle
     (Mike Woodworth)
  7. Re: RTF on OS X (Norman Palardy)
  8. Re: RTF on OS X (Norman Palardy)
  9. Visual basic declares, RB 5.5.5 (Robert Carroll)


----------------------------------------------------------------------

Message: 1
Subject: RTF on OS X
From: Bruce Moore <[EMAIL PROTECTED]>
Date: Thu, 9 Nov 2006 09:52:12 -0500


On Nov 9, 2006, at 9:43 AM, realbasic-nug-
[EMAIL PROTECTED] wrote:

I have just posted a feature request (already there since 2004) for
the
ability to save and import rtf format in RB. Anyone interested?


Yes I would like that too. I think you can do it on one platform but
not the others at present but since I would like my application to
operate the same on both platforms I do not use it.


--
Bruce Moore
Manassas, Virginia




==================================================

Message: 2
Subject: Re: RTF on OS X
From: Bart Pietercil <[EMAIL PROTECTED]>
Date: Thu, 9 Nov 2006 16:36:05 +0100

I would like the possibility to read and write OpenDocument format.
OK, I live in Belgium but still....

http://www.betanews.com/article/OpenDoc_Gains_Ground_in_Belgium_India/
1151086332

Bart Pietercil



On 9-nov-06, at 15:52, Bruce Moore wrote:


On Nov 9, 2006, at 9:43 AM, realbasic-nug-
[EMAIL PROTECTED] wrote:

I have just posted a feature request (already there since 2004)
for the
ability to save and import rtf format in RB. Anyone interested?


Yes I would like that too. I think you can do it on one platform
but not the others at present but since I would like my application
to operate the same on both platforms I do not use it.


--
Bruce Moore
Manassas, Virginia



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


==================================================

Message: 3
Subject: Re: updating canvas properties
From: Frank Bitterlich <[EMAIL PROTECTED]>
Date: Thu, 9 Nov 2006 16:40:31 +0100

When a window "opens", that does not necessary mean that it is =20
visible yet. Maybe your resize code has a dependency on information =20
that has not been initialized or isn't available at that point yet.

You could check if the code is actually executed (ie. the Open event =20
gets called), and then try to find out _why_ it doesn't work. Just =20
moving the code to a different event by trial-and-error isn't solving =20=

the problem, it's circumventing it.

Cheers,
   Frank+++

Am 09.11.2006 um 01:37 schrieb Lucila Rios:

Hi,
I have a canvas class that resizes itself after it draws a string =20
to show the whole string.  I assign the initial properties from =20
code in the open event of the window.  But when the window opens =20
the canvas doesn't resize itself; however, it does work if I put =20
the code on a push button action event.  How could I do it so that =20
it would resize after the window opens?
Luci


--=20

G=FCnter Schmidt & Co. oHG
Frank Bitterlich             eMail: [EMAIL PROTECTED]
Ben-Gurion-Ring 21           WWW:   http://www.gsco.de/
D-60437 Frankfurt            Tel.:  069 / 156809-29
GERMANY                      Fax:   069 / 156809-28



==================================================

Message: 4
Subject: Re: RTF on OS X
From: Frank Bitterlich <[EMAIL PROTECTED]>
Date: Thu, 9 Nov 2006 16:43:11 +0100

AFAIK, ODF is just XML. You already have the tools to read and write =20
XML. Adding such functionality directly to RB wouldn't make much =20
sense, as there is no corresponding data model (ie. OpenDoc document) =20=

inside RB.

Cheers,
   Frank+++

Am 09.11.2006 um 16:36 schrieb Bart Pietercil:

I would like the possibility to read and write OpenDocument format.
OK, I live in Belgium but still....

http://www.betanews.com/article/=20
OpenDoc_Gains_Ground_in_Belgium_India/1151086332

Bart Pietercil



On 9-nov-06, at 15:52, Bruce Moore wrote:


On Nov 9, 2006, at 9:43 AM, realbasic-nug-=20
[EMAIL PROTECTED] wrote:

I have just posted a feature request (already there since 2004) =20
for the
ability to save and import rtf format in RB. Anyone interested?


Yes I would like that too. I think you can do it on one platform =20
but not the others at present but since I would like my =20
application to operate the same on both platforms I do not use it.

--=20

G=FCnter Schmidt & Co. oHG
Frank Bitterlich             eMail: [EMAIL PROTECTED]
Ben-Gurion-Ring 21           WWW:   http://www.gsco.de/
D-60437 Frankfurt            Tel.:  069 / 156809-29
GERMANY                      Fax:   069 / 156809-28



==================================================

Message: 5
Subject: Re: RTF on OS X
From: Bart Pietercil <[EMAIL PROTECTED]>
Date: Thu, 9 Nov 2006 16:50:35 +0100

I hear your argument, but doesn't that go just as well for RTF?

If the "styled" editfield functionality could be styled in ODF we
would be a WHOLE lot further.
Mind you I never really used the styled editfield (besides playing),
so  I'm certainly no expert

My 2 cents,

Bart


On 9-nov-06, at 16:43, Frank Bitterlich wrote:

AFAIK, ODF is just XML. You already have the tools to read and
write XML. Adding such functionality directly to RB wouldn't make
much sense, as there is no corresponding data model (ie. OpenDoc
document) inside RB.

Cheers,
   Frank+++

==================================================

Message: 6
Subject: Re: Request for new keywords and features to handle
From: Mike Woodworth <[EMAIL PROTECTED]>
Date: Thu, 9 Nov 2006 11:03:02 -0500


yeah, my votes for thread safety are in order of importance:

object locking/unlocking (currently accessing an object variable can
cause a crash)
object alloc/dealloc (so we can construct and destory objects)
strings (you wouldn't believe the pain it is to write debug strs to
console using a struct and numbers :)
arrays (this may just be a problem with object locking/unlocking, but
i know they aren't safe currently)
framework items (my feelign is, if i can make objects and use all
intrinsic data types, i can declare to libc if i need to write a
file, or use a socket... all nice things - but not show stopper like
the above)

mike
--
Mike Woodworth
[EMAIL PROTECTED]



On Nov 9, 2006, at 9:41 AM, Daniel Stenning wrote:

Typo -  meant to write:

For my current project I DONT need to make any calls to the
frameworks in
the code I would like threaded ( its a C++ parser and
translator ) . It is
all pretty much core RB language - ie  no GUI calls, pretty just
arrays ,
strings, dictionaries and the folderItem, BinaryStream objects so
it would
be good to- at the very least make that sort of stuff thread safe
in RB.

I think that much ought to be achievable. For example, in the C++
world
there is a thread safe C++ string library available commercially.


On 9/11/06 13:44, "Daniel Stenning" <[EMAIL PROTECTED]> wrote:

For my current project I be make any calls to the frameworks in
the code I
would like threaded. It is all core RB language - no GUI calls,
pretty much
just arrays , strings and dictionaries and the folderitem,
BinaryStream
object ( its a C++ parser and translator ) so it would be good to-
at the
very least make that sort of stuff thread safe in RB.

I think that much ought to be achievable. I know for a fact there
is a
threaad safe C++ string library available commercially.

On 9/11/06 06:04, "Andy Dent" <[EMAIL PROTECTED]> wrote:

I'm with Daniel on this - do NOT underestimate the difficulties of
threading code.


On 09/11/2006, at 11:43 AM, Daniel L. Taylor wrote:
* I don't think we're ever going to see a fully preemptive-
thread safe
framework. Large parts of Win32, Carbon, and Cocoa are not thread
safe.

yep - I actually doubt this is something do-able. Transparently
making things thread-safe is *hard* computer science.

* For those thinking of jumping ship to Cocoa over this: having
done both, I
don't consider threading on Cocoa to be any easier than threading
on RB.

as someone who has written threaded programs in Cocoa, Windows and
WinCE, I agree entirely.

Useful articles in this Queue issue:
http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=332

Andy the thread-scarred (Pernese reference ;-)

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


==================================================

Message: 7
Subject: Re: RTF on OS X
From: Norman Palardy <[EMAIL PROTECTED]>
Date: Thu, 9 Nov 2006 09:56:36 -0700


On Nov 09, 2006, at 8:43 AM, Frank Bitterlich wrote:

AFAIK, ODF is just XML. You already have the tools to read and
write XML. Adding such functionality directly to RB wouldn't make
much sense, as there is no corresponding data model (ie. OpenDoc
document) inside RB.

You can read and write the XML but rendering it is the crucial part
And very large XML files can be painful with the current XML reader :)
I have one that is 55mb and it takes forever to read
I've resorted to reading it as a text file and parsing it using
regular expressions on short chunks

==================================================

Message: 8
Subject: Re: RTF on OS X
From: Norman Palardy <[EMAIL PROTECTED]>
Date: Thu, 9 Nov 2006 09:57:29 -0700


On Nov 09, 2006, at 8:50 AM, Bart Pietercil wrote:

I hear your argument, but doesn't that go just as well for RTF?

If the "styled" editfield functionality could be styled in ODF we
would be a WHOLE lot further.
Mind you I never really used the styled editfield (besides
playing), so  I'm certainly no expert

REAL should just incorporate the Formatted Text Control from True
North and then get add an ODF Reader/Writer and RTF reader/writer

==================================================

Message: 9
Subject: Visual basic declares, RB 5.5.5
From: Robert Carroll <[EMAIL PROTECTED]>
Date: Thu, 9 Nov 2006 12:52:01 -0500

HI,

I'm hoping to be able to port the following VB code to Realbasic for
a simple windows sound app.

Attribute VB_Name = "directSnd"
Public samPles As Long, myByte(360) As Byte
Public DX7 As New DirectX7, DS As DirectSound, DSB(1) As
DirectSoundBuffer
Public DESC As DSBUFFERDESC, PCM As WAVEFORMATEX
Sub Init_DX7(Hwnd As Long)
Set DS = DX7.DirectSoundCreate("") 'Create the DirectSound Object

DS.SetCooperativeLevel Hwnd, DSSCL_NORMAL 'Set the Cooperative Level

'Fill WaveFormat Structure
PCM.nFormatTag = WAVE_FORMAT_PCM
PCM.nChannels = 1
PCM.lSamplesPerSec = 11025
PCM.nBitsPerSample = 8
PCM.nBlockAlign = 1
PCM.lAvgBytesPerSec = PCM.lSamplesPerSec * PCM.nBlockAlign
PCM.nSize = 0

DESC.lFlags = DSBCAPS_STATIC Or DSBCAPS_CTRLVOLUME Or
DSBCAPS_CTRLFREQUENCY Or DSBCAPS_CTRLPAN
'set Bytes
DESC.lBufferBytes = samPles

'********************************************************
'Create Buffers   (buffer "0" and buffer "1")
Set DSB(0) = DS.CreateSoundBuffer(DESC, PCM)
Set DSB(1) = DS.CreateSoundBuffer(DESC, PCM)

DSB(0).Play DSBPLAY_LOOPING 'Initialize to play loop  DSBPLAY_LOOPING
DSB(1).Play DSBPLAY_LOOPING '( DSBPLAY_DEFAULT would play the sound
only one time )
End Sub
Sub Term_DX7() 'Clear the created DX7 Objects.
    Set DSB(0) = Nothing: Set DSB(1) = Nothing: Set DS = Nothing:
Set DX7 = Nothing
End Sub
Sub DSBWRITE(Num As Integer, ByRef Buffer() As Byte)
    'Writing an array of bytes to a given DirectSoundBuffer.
    DSB(Num).WriteBuffer 0, 0, Buffer(0), DSBLOCK_ENTIREBUFFER
End Sub

So far, only at the creating directsound object level, I've tried:

declare function DirectSoundCreate  lib "dsound.dll"  (lpGuid as
integer, ppOS as ptr, pUnkOuter as ptr) as integer

and

declare function DirectSoundCreate  lib "dsound.dll"  () as integer

since that should work with the default sound device.

then :

dim osErr as integer

osErr = DirectSoundCreate()

this actually returns an integer (probably the equivalent of some
error code).

The MSDN library lists the following return values for this function:

Return Values
If the function succeeds, the return value is DS_OK.
If the function fails, the return value may be one of the following
error values:
DSERR_ALLOCATED
DSERR_INVALIDPARAM
DSERR_NOAGGREGATION
DSERR_NODRIVER
DSERR_OUTOFMEMORY

all of which look like string values, but RB will not accept my
declaration line with a string variable return. How can I correctly
access the return values?

And, of course, how is it possible to dim RB objects to refer to the
directsound and directX objects as in lines 3 & 4 of the VB code?

any suggestions would be appreciated.

thanks

Rob

==================================================

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

End of realbasic-nug Digest, Vol 32, Issue 19
*********************************************


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to