Sign in to follow this  
Followers 0
darzanmihai

AutoitObject

8 posts in this topic

The function _AutoItObject_Class() from AutoItObject.au3 does not return a Object.

Why is that?


I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Share this post


Link to post
Share on other sites



The function _AutoItObject_Class() from AutoItObject.au3 does not return a Object.

Why is that?

Which part of my post in your previous thread was difficult for you to understand?

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

What the fuck is this forum for if not for asking for help when you need help?

ikr. Edited by DAOWAce

[size="1"]I don't mean to sound rude, but I can't help the way people interpret my words.[/size]

Share this post


Link to post
Share on other sites

Can you post an example of how you are using the function, please?

Besides didn't you ask this question earlier? I think the problem is that you're not posting your code!

The code it does not work is:

Func _ComplexCreator($Re = 0, $Im = -1)
Local $oComplexObject = _AutoItObject_Class()
    $oComplexObject.Create()
    $oComplexObject.AddProperty("Re", $ELSCOPE_PUBLIC, $Re)
    $oComplexObject.AddProperty("Im", $ELSCOPE_PUBLIC, $Im)

    $oComplexObject.AddMethod("CAbs", "_CAbs")
    $oComplexObject.AddMethod("CAbsSqr", "_CAbsSqr")
    $oComplexObject.AddMethod("CArg", "_CArg")
    $oComplexObject.AddMethod("CConj", "_CConj")

    Return $oComplexObject.Object
EndFunc ;==> _ComplexCreator

$oComplexObject.Create() errors out because $oComplexObject is not an object

_AutoItObject_Class():

Func _AutoItObject_Class()
    Local $oObj = _AutoItObject_Create()
    _AutoItObject_AddMethod($oObj, "Create", "__Au3Obj_Object_Create")
    _AutoItObject_AddMethod($oObj, "AddMethod", "__Au3Obj_Object_AddMethod")
    _AutoItObject_AddMethod($oObj, "AddProperty", "__Au3Obj_Object_AddProperty")
    _AutoItObject_AddMethod($oObj, "AddDestructor", "__Au3Obj_Object_AddDestructor")
    _AutoItObject_AddMethod($oObj, "AddEnum", "__Au3Obj_Object_AddEnum")
    _AutoItObject_AddMethod($oObj, "RemoveMember", "__Au3Obj_Object_RemoveMember")
    _AutoItObject_AddProperty($oObj, "Object", $ELSCOPE_READONLY)
    Return $oObj
EndFunc ;==>_AutoItObject_Class

The function _AutoItObject_Create() should return an object but it doesn't

the _AutoItObject_Create() function:

Func _AutoItObject_Create($oParent = 0)
    ; Author: Prog@ndy
    Local $aResult
    Switch IsObj($oParent)
        Case True
            $aResult = DllCall($ghAutoItObjectDLL, "idispatch", "CloneAutoItObject", 'idispatch', $oParent)
        Case Else
            $aResult = DllCall($ghAutoItObjectDLL, "idispatch", "CreateAutoItObject")
    EndSwitch
    If @error Then Return SetError(1, @error, 0)
    Return $aResult[0]
EndFunc ;==>_AutoItObject_Create

I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Share this post


Link to post
Share on other sites

You need to call _AutoItObject_Startup() before using those functions.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

@darzanmihai,

I do not like to be ignored....

You will be unable to post in the next 24 hours to think about it.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

If I'm MvGulik I would tell you to go fuck yourself.

No need. Besides I don'd like to and up like darzanmihai ;)

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0