PlanetSquires Forums

Support Forums => General Board => Topic started by: Scott Devitt on June 22, 2010, 04:07:23 PM

Title: Property Dialogs
Post by: Scott Devitt on June 22, 2010, 04:07:23 PM
I am not 100% sure what they are really called. Like when you click on a control and it shows the stuff you can set. I want to this with just text boxes and maybe option boxes.
Title: Re: Property Dialogs
Post by: Rolf Brandt on June 22, 2010, 06:58:39 PM
Do just that. RightClick a control, the FireFly Workspace opens and switches to properties. Many properties you can set right here. If you click on WindowStyles and click the button with (...) you can set even more properties.
Title: Re: Property Dialogs
Post by: Scott Devitt on June 22, 2010, 07:49:09 PM
What I am after is code sample of how to make my one Property Dialogs.
Title: Re: Property Dialogs
Post by: Paul Squires on June 22, 2010, 10:03:42 PM
If I am understanding you correctly, you are looking for a property list type of control??? Something like was developed by Kev Peel:  http://www.kgpsoftware.com/?e=8
Title: Re: Property Dialogs
Post by: Scott Devitt on June 23, 2010, 03:42:25 PM
This is excatly what I am wanting todo. The example works well with in powerbasic compiler but inf Firefly with Rocca headders I get errors from the include files that our out of my skill set. Is this the control you use for you "property list" in firefly. What I am dong is the user will be inputting data from a form but the fields change based on what form they are working with. So I need to generate diffrent number of text boxes for each.)


P.S. 
I love FireFly 3.
Title: Re: Property Dialogs
Post by: José Roca on June 23, 2010, 06:25:13 PM
Quote
The example works well with in powerbasic compiler but inf Firefly with Rocca headders I get errors from the include files that our out of my skill set.

Which errors? I have downloaded the current package and compiled using my headers and don't have got any errors.
Title: Re: Property Dialogs
Post by: Paul Squires on June 23, 2010, 06:59:10 PM
Quote from: Scott Devitt on June 23, 2010, 03:42:25 PM
Is this the control you use for you "property list" in firefly.
No. I wrote the Property List for FireFly from scratch. It is based on a virtual listbox example that Borje once posted on the PB forum.
Title: Re: Property Dialogs
Post by: Scott Devitt on June 23, 2010, 10:33:02 PM
I get Error 586 in C:\PBWIN90\ROCA\OAIDL.INC(207:034): User Defined Type or AS expected
Line 207: pbool as integer PTR '_VARIAN_BOOL*Macro Expansion(7): TBOOL PTR
Title: Re: Property Dialogs
Post by: José Roca on June 23, 2010, 11:46:01 PM
Oh, I see. Kev has used macros to define types. Although this can look like a good idea (C programmers do it all the time), in fact it is a very bad one when using PB because of the way PB macros work (text substitution).

In types.inc, Kev has the following macros (among many others):


Macro PVAR(n)   = n Ptr                     ' Generic pointer.
Macro PBOOL     = PVAR(TBOOL)               ' Boolean.


And when the compiler finds pbool, a member of the tagVARIANT structure


   pbool                         AS INTEGER PTR     ' _VARIANT_BOOL*


Converts it to:


   TBOOL PTR                         AS INTEGER PTR     ' _VARIANT_BOOL*


You will also get conflcts with Kev's includes if you try to use any of the names he has used for the macros. For example, if you try to use DIM pvar AS DWORD, you will get a Macro mismatch error.

Never use macros this way.
Title: Re: Property Dialogs
Post by: Scott Devitt on June 23, 2010, 11:50:08 PM
thanks for the Fast response. I am not sure how to correct this. I normal do all my code in VB but for this project we want no install needed and run from a USB memory stick. and
PB with Firelfy and you headers have be money$$$$.
Title: Re: Property Dialogs
Post by: José Roca on June 24, 2010, 12:21:34 AM
You don't have to correct anything, It is Kev who should change his include file because using macros this way is a can of worms waiting to generate all sort of conflicts. If he doesn't do it, then you will be unable to use my include files and his include files together.
Title: Re: Property Dialogs
Post by: Cho Sing Kum on June 24, 2010, 03:19:28 AM

Hi Scott,

I came across this:

http://www.powerbasic.com/support/pbforums/showthread.php?t=36324