[lazarus] Tree within library

SteveG steveg at nevets.com.au
Mon Apr 28 20:16:29 EDT 2003


Mattias Gaertner wrote:
> On Mon, 28 Apr 2003 00:12:24 +1000
> SteveG <steveg at nevets.com.au> wrote:
> 
> 
>>a few questions this time:
>>
>>First, problems using Forms in a library (.so)
>>1. If using a TTreeView I get an error msg - ERROR: 
>>[TgtkObject.CreateBitmap] Illegal depth 0,
>>as the library initializes, and am unable to focus on any items.
>>Works ok on a standard test program -
> 
> 
> I tried dynamic libs under fpc a few months ago and ran into several
> problems. How do you create the libs?
> 

I load / unload my libraries with the following code (sample library as 
attachment)
  pStr1:=StrAlloc( 255 ); 

  StrPCopy( pStr1, npFindFile('libLxSystem.so', npAppPath(), 0) ); 

  LxSystem_LibAddr := dlopen( pStr1, 1 ); 
                                                        StrDispose( 
pStr1 ); 

  pointer( LxSystem_LxCmdIn_1 ) := dlsym( LxSystem_LibAddr, 'LxCmdIn_1' );


if LxSystem_LibAddr <> Nil then dlclose( LxSystem_LibAddr ); 



> 
> 
>>2. If the form is sent behind another, then brought back to the front, 
>>all TStaticTest objects and TSpeedbuttons have disappeared and the 
>>screen needs to be re-drawn in code to refresh
> 
> 
> Normally the gtk sends an expose event in such cases, which results in a
> LM_PAINT message. Can you send me an example?
> 
The sample library I have attached will cause the above problem - would 
you prefer me to supply a working exe/lib example ?


> 
> 
>>3. TSpeedbuttons disappear if the mouse is passed over them (not 
>>clicking) - screen redraw needed to refresh
> 
> 
> Seems to be related to the above.
> 
> 
> 
>>These problems on normal programs, and within libraries
>>1. Images on TImage, and TSpeedbutton (actually any images at all once 
>>the program runs) seem ok when viewing in the IDE, but once program runs 
>>all images are just various blocks of solid color
> 
> 
> Streaming images to the LFM files is not yet implemented. Maybe we should
> add a warning message to not load images with form editing. Only load images
> at runtime.
> 
> 
> 
>>2. Problems with tab order in any program - not only unable to set 
>>specific ordering, focus seems to disappear after 'last' control (takes 
>>two tabs to re-appear) - my test prog is new form at Laz start, add 4 
>>TEdits and run - tab problems ??
> 
> 
> Tab stops are disabled, because there were some components doing strange
> things. The current tabbing you see, is the default gtk behaviour. Maybe
> someone give this a second try. I'm currently busy with the IDE.
> 
> 
> 
>>All of these seem to be grapic related. Is this a problem only on my 
>>machine ? (RH8 + KDE, latest CVS)
> 
> 
> No, I don't think so.
> 
> 
> Mattias
> 
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
> 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: zip00011.zip
Type: application/octet-stream
Size: 2469 bytes
Desc: "Library.zip"
Url : http://localhost/pipermail/lazarus/attachments/20030428/1b7ef971/zip00011.obj


More information about the Lazarus mailing list