Page 2 of 4 <1234>
Topic Options
#206315 - 2012-11-29 02:19 PM Re: KiXnet first public release, second build [Re: It_took_my_meds]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
in output .net replaces $ with consolekeyinfo?

open() crashes instead of erroring, will fix today

will look into getfiles() as it also affects dir()
btw, getfiles works fine if you run it as administrator...
_________________________
!

download KiXnet

Top
#206316 - 2012-11-30 12:31 AM Re: KiXnet first public release, 3rd build [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
fixed erroring for open()
_________________________
!

download KiXnet

Top
#206318 - 2012-11-30 01:40 AM Re: KiXnet first public release, 3rd build [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
can someone try some kixforms script on it?
.net is broken on my laptop, so can't really debug my com-handling at all :P
_________________________
!

download KiXnet

Top
#206319 - 2012-11-30 02:06 AM Re: KiXnet first public release, 3rd build [Re: Lonkero]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Sorry it doesn't work for me.

 Code:
? "createobject kixforms: "
$kixforms = CreateObject("Kixtart.Form")
? "show form:"
$kixforms.visible = 1
@error " " @result " " @serror ?

gives

 Code:
createobject kixforms:
show form:Object of type 'System.String' cannot be converted to type 'System.Object[]'.
unrecoverable internal error occured while Executing the script.
Object reference not set to an instance of an object.


 Code:
? "createobject kixforms: "
$kixforms = CreateObject("Kixtart.Form")
? "show form:"
$kixforms.show()
@error " " @result " " @serror ?

gives

 Code:
createobject kixforms:
show form:unrecoverable internal error occured while Executing the script.
Unable to cast object of type 'System.Object[]' to type 'System.Int32[]'.


 Code:
? "createobject kixforms: "
$kixforms = CreateObject("Kixtart.System")
@error " " @result " " @serror ?
? "create form:"
$form = $kixforms.Form
@error " " @result " " @serror ?
? "show form:"
$forms.show()
@error " " @result " " @serror ?

gives

 Code:
createobject kixforms: 0  The operation completed successfully

create form:unrecoverable internal error occured while Executing the script.
Exception has been thrown by the target of an invocation.

Top
#206320 - 2012-11-30 02:34 AM Re: KiXnet first public release, 3rd build [Re: It_took_my_meds]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, thank you sir.
_________________________
!

download KiXnet

Top
#206321 - 2012-11-30 03:57 AM Re: KiXnet first public release, 3rd build [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
btw, do you have both kixforms classic and the .net versions installed?
I only have classic and that is what is causing me pain. .net doesn't like to create com objects that are not manifests, as in, it seems to HATE real com.
_________________________
!

download KiXnet

Top
#206322 - 2012-11-30 04:08 AM Re: KiXnet first public release, 3rd build [Re: Lonkero]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
I just rebuilt my computer and only have classic installed at the moment, although I can install kixforms.net if you like. I haven't instantiated a COM object in .NET for a long time but I don't recall having issues with it when I did. I was however using VB.Net which has a CreateObject function.
Top
#206323 - 2012-11-30 04:24 AM Re: KiXnet first public release, 3rd build [Re: It_took_my_meds]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yea, in vb it is different.
object someobjectHandle = Activator.CreateInstance(objType);

is what is supposed to work in c#, and like with you, you get object created fine.

you could try:
 Code:
? "createobject kixforms: "
$kixforms = CreateObject("Kixtart.System")
@error " " @result " " @serror ?
"create form:"
$form = $kixforms.Form()
@error " " @result " " @serror ?
"show form:"
$form.show()
@error " " @result " " @serror ?


made form creation a method call and fixed your typo with the form(s)

why that causes accessviolation exception on my system I have no idea and again, the only way to fix a corrupted .net in win7 is a reinstall.
_________________________
!

download KiXnet

Top
#206324 - 2012-11-30 04:31 AM Re: KiXnet first public release, 3rd build [Re: Lonkero]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Unfortunately, I still get the same error with the code you suggested.

A translation engine gave me this as the equivalent of CreateObject in C#
 Code:
object adoConn = Interaction.CreateObject("ADODB.Connection")

Top
#206325 - 2012-11-30 05:09 AM Re: KiXnet first public release, 3rd build [Re: It_took_my_meds]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
interaction? in what namespace that would be?

I was checking my old code and I even tried with winapi calls and I end up with error 87 or accessviolation. and the only library that keeps failing on me was kixforms by my notes \:\)
_________________________
!

download KiXnet

Top
#206326 - 2012-11-30 05:14 AM Re: KiXnet first public release, 3rd build [Re: Lonkero]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Some Google-fu came back with Microsoft.VisualBasic.Interaction. I figure you could use that from C# if you reference the Microsoft.VisualBasic assembly?
Top
#206327 - 2012-11-30 01:52 PM Re: KiXnet first public release, 3rd build [Re: It_took_my_meds]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
reading this stuff, remembered that kixnet is multithreaded.
so that is something for the coming releases.
starting and controlling your own threads.
_________________________
!

download KiXnet

Top
#206333 - 2012-12-01 05:52 AM Re: KiXnet first public release, 3rd build [Re: Lonkero]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Sounds great!
Top
#206334 - 2012-12-01 08:46 PM Re: KiXnet first public release, 3rd build [Re: It_took_my_meds]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
Ran thru the test.kix script again. Most works now. There are still some bugs though.

The line...
 Code:
call @ScriptDir+"\test_call.kix"
Produces message "Exception has been thrown by the target of an invocation.
call to unexisting script file
on script line:1 char position:1
Hit Enter to quit"
even thought the @scriptdir is populating correctly, and the test_call.kix file exists.

These lines...
 Code:
$files = getfiles("c:\windows",0)
? "ubound: "+ubound($files)
Produces message "Exception has been thrown by the target of an invocation.
Array does not have that many dimensions.
on script line:2 char position:27
Hit Enter to quit"

And of course the kixforms section fails. It gets past the createobject line, but bombs out on the .Show() line.

Top
#206335 - 2012-12-01 08:50 PM Re: KiXnet first public release, 3rd build [Re: ShaneEP]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
Also, are the SetOption properties supposed to work?

 Code:
SetOption("WrapAtEOL","On")
Produces "Exception has been thrown by the target of an invocation.
Index and length must refer to a location within the string.
Parameter name: length
on script line:3 char position:1
Hit Enter to quit"

And the @ScriptDir might have a problem after all. It is cutting off after about half the path.

Top
#206336 - 2012-12-02 12:16 AM Re: KiXnet first public release, 3rd build [Re: ShaneEP]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, @scriptdir, ubound() and setoption()?

was implementing the .net part... I guess I could put that on hold before I get these fixed ;\)


[edit1]
scriptdir seems to be returning exe dir for me.

[edit2]
yea, as I didn't check the macro-code, scriptdir is indeed faulted...


Edited by Lonkero (2012-12-02 12:41 AM)
_________________________
!

download KiXnet

Top
#206337 - 2012-12-02 12:53 AM Re: KiXnet first public release, 4th build [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
scriptdir fixed in this build.
_________________________
!

download KiXnet

Top
#206338 - 2012-12-02 01:08 AM Re: KiXnet first public release, 4th build [Re: Lonkero]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
Who wrote those macros anyways...
Top
#206339 - 2012-12-02 01:14 AM Re: KiXnet first public release, 4th build [Re: ShaneEP]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
some community college dude? ;\)
_________________________
!

download KiXnet

Top
#206340 - 2012-12-02 01:19 AM Re: KiXnet first public release, 4th build [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the setoption can't be the cause of your error.
what was your next line?
_________________________
!

download KiXnet

Top
Page 2 of 4 <1234>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 557 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.076 seconds in which 0.028 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org