KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

createobject: Kixtart.SYSTEM .vs. Kixtart.form

 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Eddie
KiXforms Dabbler
KiXforms Dabbler


Joined: 05 Apr 2005
Posts: 11

PostPosted: Tue Sep 05, 2006 7:54 am    Post subject: createobject: Kixtart.SYSTEM .vs. Kixtart.form Reply with quote

Hi there (esp. for Shawn Cool )

I found a problem that I couldīnt explain logical (and print it here before Jochen has to translate from the german Forum Laughing ):

In an application thatīs generated by using createobject("Kixtart.system") a second object createobject("Kixtart.system") is called. Salience is:
* You can change between both windows by mouseclick
* If you shuffle the first apllication into the edge of the screen and call the second object this will be placed outside of the container.

Hereīs an example for this:
Code:
 
setconsole("hide")

 $SYSTEM                     = createobject("Kixtart.System")
 $PROJEKT                    = $SYSTEM.form()
 $PROJEKT.size             = 300,300
 $PROJEKT.windowstate = 0
 $WECHSEL                  = $PROJEKT.controls.button("Objekt")
 $WECHSEL.center
 $WECHSEL.onclick       = "OBJEKT_AUFRUF"
 $PROJEKT.center
 $PROJEKT.show
 while $PROJEKT.visible
   $=execute($PROJEKT.doevents)
 loop

 function OBJEKT_AUFRUF()
   dim $FENSTER
   $FENSTER        = $SYSTEM.form
   $FENSTER.size = 200,200
   $FENSTER.show
   while $FENSTER.visible
     $=execute($FENSTER.doevents)
   loop
 endfunction


Now we change the objects to createobject("Kixtart.form") :
Code:
 
 $PROJEKT = createobject("Kixtart.form")
 $PROJEKT.size            = 300,300
 $PROJEKT.windowstate     = 0
 $WECHSEL = $PROJEKT.controls.button("Objekt")
 $WECHSEL.center
 $WECHSEL.onclick = "OBJEKT_AUFRUF"
 $PROJEKT.center
 $PROJEKT.show
 while $PROJEKT.visible
   $=execute($PROJEKT.doevents)
 loop

 function OBJEKT_AUFRUF()
   dim $FENSTER
   $FENSTER      = createobject("Kixtart.form")
   $FENSTER.size = 200,200
   $FENSTER.show
   while $FENSTER.visible
     $=execute($FENSTER.doevents)
   loop
 endfunction


Salience now:
* After calling the second object you are NOT able to change to the first object
* If you shuffle the first object into the edge of the screen the second object is placed in the middle of the first object.


Why do .system-objects behave oneselfs different to .form-objects?

Eddie
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Tue Sep 05, 2006 11:47 am    Post subject: Re: createobject: Kixtart.SYSTEM .vs. Kixtart.form Reply with quote

Eddie wrote:
...
I found a problem that I couldīnt explain logical (and print it here before Jochen has to translate from the german Forum Laughing ):
...


But the fact that the german forum is down since I offered my services is coincidental, isn't it ???

Cunning

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Tue Sep 05, 2006 12:31 pm    Post subject: Reply with quote

"Kixtart.System" replaced "Kixtart.form" and act differently by design. To get "Kixtart.System" to act the way you see "Kixtart.form" acting modify these two lines.

from:
Code:

$FENSTER = $SYSTEM.form()
$FENSTER.show()


To:
Code:

$FENSTER = $SYSTEM.form($PROJEKT)
$FENSTER.showmodal()


Here is your code to show the change:

Code:

$SYSTEM = CreateObject("Kixtart.System")

$PROJEKT = $SYSTEM.form()
$PROJEKT.size = 300,300
$PROJEKT.windowstate = 0

$WECHSEL = $PROJEKT.controls.button("Objekt")
$WECHSEL.center
$WECHSEL.onclick = "OBJEKT_AUFRUF"

$PROJEKT.center
$PROJEKT.show

While $PROJEKT.visible
 $=Execute($PROJEKT.doevents)
Loop

Function OBJEKT_AUFRUF()
 Dim $FENSTER
 
 $FENSTER = $SYSTEM.form($PROJEKT)
 $FENSTER.size = 200,200
 $FENSTER.showmodal()
 
 While $FENSTER.visible
   $=Execute($FENSTER.doevents)
 Loop
EndFunction

_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
Eddie
KiXforms Dabbler
KiXforms Dabbler


Joined: 05 Apr 2005
Posts: 11

PostPosted: Wed Sep 06, 2006 10:07 am    Post subject: Reply with quote

@Jochen: The database-server of foren-city broke down - thatīs the price for a free of charge service like a forum ...

@benny69: Thanks for this info - it works fine. I never used showmodal before so I never thought about it to use.

But if you NOW use showmodal in my second .form-object (second script) the effect is that the script quits without any result, whether using kix32 or wkix32, although showmodal a method of a .form-object is ...

A N D N O W - try a mixed possibility:
Code:
$SYSTEM = CreateObject("Kixtart.System")

$PROJEKT = $SYSTEM.form()
$PROJEKT.size = 300,300
$PROJEKT.windowstate = 0

$WECHSEL = $PROJEKT.controls.button("Objekt")
$WECHSEL.center
$WECHSEL.onclick = "OBJEKT_AUFRUF"

$PROJEKT.center
$PROJEKT.show

While $PROJEKT.visible
 $=Execute($PROJEKT.doevents)
Loop

Function OBJEKT_AUFRUF()
 Dim $FENSTER
 
 $FENSTER = createobject("Kixtart.form")
 $FENSTER.size = 200,200
 $FENSTER.showmodal
 
 While $FENSTER.visible
   $=Execute($FENSTER.doevents)
 Loop
EndFunction


The effect: After calling the second object (thatīs placed outside itīs parent object) and closing this again you are NOT able to click into the first object WITHOUT using the Task-Manager ... Scream No No Sceptic

So Iīm back at my first question: WHY does .form-objects behave different from .system-objects? By the way: this question is not so important for my survive (@Jochen: what the hell is the translation of überlebenswichtig???) but only my addiction to comprehend the logic of KiXForms-Objects.

So far un bes demnäx Laughing

Eddie
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Wed Sep 06, 2006 11:26 am    Post subject: Reply with quote

One could say crucial
_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Wed Sep 06, 2006 12:38 pm    Post subject: Reply with quote

Simply stated - the Kixtart.Form object is a depracted object and should not be used anymore. This object hasn't been in the CHM file for a long time. Kixtart.Form and Kixtart.System are not compatible with one another. The preferred method of creating forms is to create an instance of Kixtart.System, then use $System.Form.

-Shawn
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group