|
-
Aug 14th, 2021, 02:47 AM
#11
Re: TwinBasic
 Originally Posted by WaynePhillipsEA
Ah OK, the runtime error is what is expected here; same as VB6. Without the 'Set', the object on the RHS is probed at runtime for its default member through IDispatch (DISPID_VALUE), and then the result from that is passed on to the LHS object similarly using DISPID_VALUE, with property-put semantics. With IDispatch being late-bound, this is a runtime-error instead of a compile-error.
Wow, ok. I had no idea it worked like that. My knowledge of the internal workings of COM is no where near yours.
 Originally Posted by WaynePhillipsEA
However, twinBASIC could be smarter than VB6 here, as it knows for sure that there's no default members defined on these internally defined classes, and so could throw a compile-error.
That would be a good idea. Errors like that don't exist in VB.Net or C# as far as I know. That's why it felt so weird to me. A general rule of thumb might be to consider any error that can be caught at compile time should be caught at compile time. This error qualifies but only for scenarios where the type being assigned is known.
Of course this is not what I'd consider a major pain. It would be acceptable if it stayed as it is provided we get a better description of why it crashed instead of just "unhandled error". The first time it happened to me, it took me quite a while to figure out that not using Set to assign objects to variables was the cause.
 Originally Posted by WaynePhillipsEA
v0.10.4333 just released. Handles-clause intellisense is now available, and the Debug object intellisense is also fixed.
Just tried them. Works great so far!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|