Xojo Conferences
XDCMay2019MiamiUSA

RB's XML projects (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: robust HTTP server in RB?
Next thread: [ANN] 3DMF Workshop v0.6d and Quesa Wrappers v0.6.1b (Rb3D extensions)


Win32 API Declares   -   Berg, Heath
  RB's XML projects   -   Norman Palardy
   Re: RB's XML projects   -   Keith Hutchison
   Re: RB's XML projects   -   Joseph J. Strout
   Re: RB's XML projects   -   Norman Palardy
   Re: RB's XML projects   -   Norman Palardy
    Help with INI   -   TJ Visicaro
   Re: RB's XML projects   -   Mark Nutter
    Re: RB's XML projects   -   Norman Palardy

RB's XML projects
Date: 02.08.05 07:02 (Tue, 2 Aug 2005 00:02:24 -0600)
From: Norman Palardy
Not sure what possessed me to try this BUT ....

Take a new RB project ( I started with 5.5.4 )
Add a pushbutton
Then a popup menu

In the pushbutton action event put
msgbox "pushbutton1 action"
and in the chnage for the popup menu put
msgbox "popupmenu1 change"

Save this as an XML project
Now (here's the fun part) edit the XML
Find the FIRST set of enclosing Tags like
<ControlBehavior>
</ControlBehavior>

that should say in it somewhere

<Superclass>PushButton</Superclass>

And move this AFTER the next Control Behavior

Then reopen the project in RB.
Notice that the pushbutton now has a CHANGE event, and the listbox has
an ACTION event
And, if you run it, despite the IDE layout showing you the controls in
one format they actually behave in another (they've switched places
because of the XML change)

And, so far RB 5.5.4, 5.5.5 and RB 2005r1 all behave this way.

What this little adventure in to the XML file format pointed out was
that the behavior a control exhibits and the control definition are
actually stored separately in the XML ( there is a separate set of tags
for ControlBehavior and for the Control ) This seems inherent from the
fact the Window owns the actions, not the controls and so the window
has the list of behaviors for controls in the order they exist in the
control list (?) and the properties are in a separate place in the XML
but the same order.

And, also that mucking about, which I expected to cause some weird and
horrific crash or project corruption, DIDN'T !

_______________________________________________
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>

Re: RB's XML projects
Date: 02.08.05 07:47 (Tue, 2 Aug 2005 16:47:31 +1000)
From: Keith Hutchison
Hi Norman

So how would you make use of this?
Curious

Keith

> Not sure what possessed me to try this BUT ....
>
> Take a new RB project ( I started with 5.5.4 )
> Add a pushbutton
> Then a popup menu
>
> In the pushbutton action event put
> msgbox "pushbutton1 action"
> and in the chnage for the popup menu put
> msgbox "popupmenu1 change"
>
> Save this as an XML project
> Now (here's the fun part) edit the XML
> Find the FIRST set of enclosing Tags like
> <ControlBehavior>
> </ControlBehavior>
> that should say in it somewhere
>
> <Superclass>PushButton</Superclass>
> And move this AFTER the next Control Behavior
>
> Then reopen the project in RB.
> Notice that the pushbutton now has a CHANGE event, and the listbox has
> an ACTION event
> And, if you run it, despite the IDE layout showing you the controls in
> one format they actually behave in another (they've switched places
> because of the XML change)
>
> And, so far RB 5.5.4, 5.5.5 and RB 2005r1 all behave this way.
>
> What this little adventure in to the XML file format pointed out was
> that the behavior a control exhibits and the control definition are
> actually stored separately in the XML ( there is a separate set of tags
> for ControlBehavior and for the Control ) This seems inherent from the
> fact the Window owns the actions, not the controls and so the window
> has the list of behaviors for controls in the order they exist in the
> control list (?) and the properties are in a separate place in the XML
> but the same order.
>
> And, also that mucking about, which I expected to cause some weird and
> horrific crash or project corruption, DIDN'T !
>
> _______________________________________________
> 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>

Re: RB's XML projects
Date: 02.08.05 15:22 (Tue, 2 Aug 2005 08:22:47 -0600)
From: Joseph J. Strout
At 12:02 AM -0600 8/2/05, Norman Palardy wrote:

>What this little adventure in to the XML file format pointed out was
>that the behavior a control exhibits and the control definition are
>actually stored separately in the XML ( there is a separate set of
>tags for ControlBehavior and for the Control )

Yes, as it must be. You can have many controls sharing the same
behavior (i.e., a control array).

>And, also that mucking about, which I expected to cause some weird
>and horrific crash or project corruption, DIDN'T !

Good news! :)

Best,
- Joe

Re: RB's XML projects
Date: 02.08.05 15:35 (Tue, 2 Aug 2005 08:35:16 -0600)
From: Norman Palardy

On Aug 02, 2005, at 12:47 AM, Keith Hutchison wrote:

> Hi Norman
>
> So how would you make use of this?
> Curious
>
Not really sure ....
It was just really odd that by moving the order of the behaviors I got
a listbox to act like a pushbutton, but only at run time

_______________________________________________
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>

Re: RB's XML projects
Date: 02.08.05 15:53 (Tue, 2 Aug 2005 08:53:32 -0600)
From: Norman Palardy

On Aug 02, 2005, at 8:22 AM, Joseph J. Strout wrote:

> At 12:02 AM -0600 8/2/05, Norman Palardy wrote:
>
>> What this little adventure in to the XML file format pointed out was
>> that the behavior a control exhibits and the control definition are
>> actually stored separately in the XML ( there is a separate set of
>> tags for ControlBehavior and for the Control )
>
> Yes, as it must be. You can have many controls sharing the same
> behavior (i.e., a control array).

Ahhh I see .... makes sense

>> And, also that mucking about, which I expected to cause some weird
>> and horrific crash or project corruption, DIDN'T !
>
> Good news! :)

It was a little weird that the button became a popup and vice versa
despite what I saw in the IDE.

THis was more just a curiosity than anything ....

_______________________________________________
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>

Re: RB's XML projects
Date: 02.08.05 17:37 (Tue, 2 Aug 2005 09:37:52 -0700 (PDT))
From: Mark Nutter


--- Norman Palardy <<email address removed>>
wrote:

> Not sure what possessed me to try this BUT ....
>
> Take a new RB project ( I started with 5.5.4 )
> Add a pushbutton
> Then a popup menu
>
> In the pushbutton action event put
> msgbox "pushbutton1 action"
> and in the chnage for the popup menu put
> msgbox "popupmenu1 change"
>
> Save this as an XML project
> Now (here's the fun part) edit the XML
> Find the FIRST set of enclosing Tags like
> <ControlBehavior>
> </ControlBehavior>
> that should say in it somewhere
>
> <Superclass>PushButton</Superclass>
> And move this AFTER the next Control Behavior
>
> Then reopen the project in RB.
> Notice that the pushbutton now has a CHANGE event,
> and the listbox has
> an ACTION event
> And, if you run it, despite the IDE layout showing
> you the controls in
> one format they actually behave in another (they've
> switched places
> because of the XML change)

You realize, of course, that this is how Dr. Moreau
got his start...

;->

Mark Nutter

Quick and easy regex creation and debugging!
http://www.bucktailsoftware.com/products/regexplorer/

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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>

Re: RB's XML projects
Date: 02.08.05 17:41 (Tue, 2 Aug 2005 10:41:38 -0600)
From: Norman Palardy

On Aug 02, 2005, at 10:37 AM, Mark Nutter wrote:
>
> You realize, of course, that this is how Dr. Moreau
> got his start...
>
LOL .... mwaaaahaaaahaaa ....
it was actually just me poking about in trying to build a program that
would take a module/window/etc, spit out the XML with all the
positioning bits that are not necessary and then put that into
CVS/Subversion/etc.
This way diff's of files would only focus on relevant changes and not
bits where someone simply repositioned a window in the IDE.
While poking around in the XML I noticed the way the structure was and
wondered what would happen if I rearranged things a bit and ...

the rest is history

_______________________________________________
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>