Re: Win32lib tweak

new topic     » goto parent     » topic index » view thread      » older message » newer message
Graeme said...

not really sure who is maintaining win32lib or where I should be posting this but...

I don't think anyone is actively maintaining it right now. Anyone who would like to volunteer could be given access to that project on SourceForge.

Graeme said...

I'm unsure why the call_proc() would be outside of the if ctrl_Type[TC_id] = TabControl block as it uses tab_id for a parameter which would be unassigned if the test failed. It's also worth pointing out that this error has never occurred because test is itself redundant anyway as the only 2 source lines that call the procedure do it as a result of this same check so it will never fail.

getTabItem() returns 0 if there is no currently selected tab item in the control, so it is quite possible to get an OOB subscript crash just by creating a tab control and calling setVisible() on it.

Arguably there is no real need to call setVisible() on a tab control before it has an active tab item, but I don't think the lib should be crashing with an OOB subscript just because of that and it's cleaner code anyway.

I would say you're correct that if ctrl_Type[TC_id] were to ever not be TabControl the whole thing would just crash because tab_id would have no value. That's a good catch!

Win32Lib is one of the oldest and largest Euphoria projects and I'm sure the deeper you dig, the more oddities like this you'll find. There's probably quite a lot of code that can be cut down.

Whenever we do get Euphoria 4.2 shipped, Win32Lib is going to need a major overhaul to support memstructs, which would then make it 64-bit compatible. Volunteers are always welcome!

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu