Page 2 of 3 <123>
Topic Options
#208498 - 2014-02-05 02:24 AM Re: kixforms .net actually working for anyone? [Re: NTDOC]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
I'm sorry to say, I saw that Shawn was online shortly after Allen emailed him. It would appear that he read this thread but didn't bother to respond.

Shawn,

WTF? You used to be my absolute hero! By just completely walking away without giving us a method to keep things working and up to date, you undo all the great legacy of your work. Imagine if you had invested many years of your time in developing a system, and the guy who wrote a core component to all of your work all of a sudden leaves and shows no indication of ever being contactable again. Well, you would be concerned wouldn't you? You'd be wondering how long it will be until the technology moves on to the point where key features are no longer supported, or even worse, it no longer works at all.

Then you'd be left with many years of your work down the drain :-(

Classic has a serious issue that results in the GUI not drawing correctly after extended use of forms that have a lot of detail in them. There are also scenarios with menus that trigger fatal exceptions. .NET is moving forward and it will only be a matter of time until the 2.0 framework is no longer supported.

I'm sure no one would expect you to do the same thing for the rest of your life. People need to move on and explore other things; just please don't leave us in the lurch.

Top
#208499 - 2014-02-05 02:51 AM Re: kixforms .net actually working for anyone? [Re: It_took_my_meds]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
Are you using the .Default property on your form objects by any chance? I've noticed in the past that it has caused form redrawing problems for me. Just a quick FYI.
Top
#208500 - 2014-02-05 03:12 AM Re: kixforms .net actually working for anyone? [Re: ShaneEP]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Thanks for the tip Shane but that is not my issue. Something is causing the forms to not dispose properly. I've tried all sorts of things, including recursing through all the controls and disposing of them individually, but to no avail. I have a feeling that it is due to expandos, but I'm not sure.
Top
#208501 - 2014-02-05 03:21 AM Re: kixforms .net actually working for anyone? [Re: It_took_my_meds]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
oh... if anyone remembers bbchecker. it had memory leak issue and that was due to forms not disposing. can't remember was kixforms fixed or did I have to code around the issue.
_________________________
!

download KiXnet

Top
#208502 - 2014-02-05 03:26 AM Re: kixforms .net actually working for anyone? [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Long time ago but didn't Shawn come up with another connect method for you?
Top
#208508 - 2014-02-05 03:34 PM Re: kixforms .net actually working for anyone? [Re: NTDOC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
huh?
_________________________
!

download KiXnet

Top
#208522 - 2014-02-06 04:57 AM Re: kixforms .net actually working for anyone? [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
I remember your BBS checking tool. At the time Shawn was very active and the two of you worked on it back and forth and I thought that the original connect method was update/replaced by something newer back then. But just guessing here as it was quite a while ago.
Top
#208526 - 2014-02-06 02:53 PM Re: kixforms .net actually working for anyone? [Re: NTDOC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the connect method, yes, I added a server component written in PHP on korg so I would not need to read the bloated html or the non-functioning rss feeds the board provides.

it's been many many years ago so I do not remember was the form disposing leak fixed or was it something that had to do with the underlying api and couldn't be addressed.
_________________________
!

download KiXnet

Top
#208609 - 2014-02-20 03:41 PM Re: kixforms .net actually working for anyone? [Re: NTDOC]
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I will see about getting Kixforms rebuilt under Visual Studio 2008. If there are any particular bugs that need fixing let me know.

Was thinking of simply hosting the new DLL from Korg ;\)

Top
#208612 - 2014-02-20 09:07 PM Re: kixforms .net actually working for anyone? [Re: Shawn]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Cool. Sounds good, thanks Shawn
Top
#208615 - 2014-02-24 09:04 AM Re: kixforms .net actually working for anyone? [Re: NTDOC]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Shawn, that's wonderful news! I've been off line for a bit as I'm on holidays (skiing in Japan - life's tough ;). I'll document the bugs I've found and their work-arounds that should help you in resolving them. I think if the community joins in with issues they have found and perhaps with (hopefully very simple) feature requests then a just little bit of your time you could add a lot of value. I'll post something in a few days, if that is OK with you. :-)
Top
#208617 - 2014-02-25 12:06 AM Re: kixforms .net actually working for anyone? [Re: It_took_my_meds]
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Thanks Richard. Enjoy your holidays. Looking forward to chatting when you get back.
Top
#208631 - 2014-03-01 12:19 AM Re: kixforms .net actually working for anyone? [Re: Shawn]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Hi Shawn,

Sorry this took longer than expected to get back to you. I picked up a virus on my way back from Japan and have been pretty sick since. (Fun fact - your odds of picking up a virus increase by 190 times if you travel in a plane). Anyway, I digress.

Issue 1 - Forms and controls not disposing correctly.
This really is the most serious bug I know of in KiXforms. If you create and close enough forms with a lot of controls on them, eventually some graphical resource exceeds a threshold and the GUI stops drawing correctly. It can also affect other applications when it does this as well. Thankfully, I finally did recently find a work around for this issue. I tried a similar approach unsuccessfully before but with some tweaking I've created a dispose function that can be used on forms and controls to ensure they are properly killed.

 Code:
Function Dispose($Control)

	; KiXforms doesn't properly dispose of controls. Call this function on forms and controls to properly remove them and avoid GUI issues.
	If VarType($Control) = 9
		Dim $i
		For $i = $Control.Controls.Count - 1 to 0 Step -1
			Dispose($Control.Controls($i))
		Next
		$Control.Dispose
	EndIf
	
EndFunction


Issue 2 - Fatal exception when recreating menu item with a previously used shortcut
In one of my apps, I change what items are in a menu based on the context of the data being looked at. If you assign a keyboard shortcut to a menu item, then clear the menu and add another menu with the same keyboard shortcut (e.g Ctrl+T), then a fatal exception is triggered when the user uses the keyboard shortcut. Thankfully, the work around is simple.

 Code:
;clear menu
For $i = $Menu.MenuItems.Count - 1 to 0 Step -1
	$Menu.MenuItems($i).ShortCut = ""
	$Menu.MenuItems.Remove($i)
Next

On a side note, it would be good to insert menu items at specific positions

Issue 3 - Duplicate or sometimes unactioned events come through
I don't know if this is an issue with KiXforms or with the OS, but I often see form move and form resize events coming through when nothing has been done to the form. The work arounds are of course simple.

 Code:
If $Form.LastTop <> $Form.Top Or $Form.LastLeft <> $Form.Left
	; do stuff
	$Form.LastTop = $Form.Top
	$Form.LastLeft = $Form.Left
EndIf


 Code:
If $Form.LastWidth <> $Form.Width Or $Form.LastHeight <> $Form.Height
	; do stuff
	$Form.LastWidth = $Form.Width
	$Form.LastHeight = $Form.Height
EndIf


Unfortunately the OnMouseMove event on GridViews is unusable as a flood of events comes through even when the mouse isn't being moved. (Handy tip with gridviews: set EditOnEnter = 1 and you don't need to double click cells that are comboboxes to get them to show the list.)

Issue 4 - Items with over 64 characters in a gridview combobox cause a fatal exception
I don't know of a workaround here.

Humble feature requests
  • It would be good to get OnMouseMove events for listview and gridview headers to enable easy reordering of columns
  • It would be good to get OnMove events for forms when they are being moved rather than at the completion of the move - I suspect this would be difficult to do however
  • It would be good to set the colours for gridview and listview column headers as well as scrollbars
  • It would be good to add support for Windows 7 features such a jumplists
  • It would be really good to natively display HTML
  • It would be good for pictureboxs to support more formats than bitmap
  • It would be good to be able to get the maximum width of visible items in treeviews
  • It would be good to have a GetForm() method on all controls to make sure you make changes to the correct form. I currently extensively use the GetForm function below to address this but having it inbuilt would be handy for people.
 Code:
Function GetForm(Optional $Sender)

	$GetForm = IIf(VarType($Sender), $Sender, $System.Sender)
	If VarType($GetForm)
		If $GetForm.Class = "Menu" ; Menu class doesn't have a parent property
			$GetForm = $System.ActiveForm
		Else
			While $GetForm.Class <> "Form"
				$GetForm = $GetForm.Parent
			Loop
		EndIf
	Else
		$GetForm = $System.ActiveForm
	EndIf

EndFunction


I'm sorry if this list looks too demanding, I've just tried to be as thorough as possible. Anything you can do to assist would be very much appreciated.
Sincere thanks and respect,

Richard

Top
#208632 - 2014-03-01 06:55 AM Re: kixforms .net actually working for anyone? [Re: Shawn]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
BTW, if you are at all interested in what I've been working on (and off) with KiXforms all these years, I've attached the current version of the help file for the interface to my inventory system. It's not complete yet because I'm in the process of adding some pretty cool charting capability (IMHO).

I couldn't have done it without you :-)

Richard

Edit: I think there is something wrong the forum file attachment. I tried reattaching it but it gives a not found message when trying to download it. Maybe an admin can look at the issue? Anyway, here is another link IMS Console Help File


Attachments
IMS Console.zip (766 downloads)
Description:




Edited by It_took_my_meds (2014-03-01 09:39 PM)
Edit Reason: Added another link

Top
#208634 - 2014-03-01 04:50 PM Re: kixforms .net actually working for anyone? [Re: It_took_my_meds]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
Thanks for sharing Richard. The file attachment doesn't seem to be working however. Not sure if it's just my system or not.
Top
#208637 - 2014-03-01 09:47 PM Re: kixforms .net actually working for anyone? [Re: ShaneEP]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Yeah there is something wrong with the forum link that I can't remedy, I've left it there for the admins to diagnose. Please use this link IMS Console Help File.
Top
#208641 - 2014-03-02 04:42 AM Re: kixforms .net actually working for anyone? [Re: It_took_my_meds]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
thinking about the disposing issue... there is 2 different approaches that could have been taken when kixforms was made.
depending on which path was used, this issue is either by design (until the user calls dispose, kixforms holds a handle to the control) or by windows "feature" as released objects do not get automatically disposed.

from msdn: "Dispose will be called automatically if the form is shown using the Show method."

which does not really make sense. it can not dispose what is currently being used. or maybe it means that shown forms will be automatically disposed, when handles are freed.
_________________________
!

download KiXnet

Top
#208642 - 2014-03-02 05:45 AM Re: kixforms .net actually working for anyone? [Re: Lonkero]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
If it is by design, then that's cool; people just need to be aware of it if they want to write clean KiXforms apps. That is why this discussion is good and at least there is a current working solution/work around that people can use. In any case, the dispose method on controls is not documented so I'm sure many people wouldn't know to do it. I feel there is definitely a bug here however as one would expect that calling .dispose() on a form should successfully dispose of the form, but it doesn't. Only by recursing through all the controls and calling .dispose() on every control from the branches back to the root, can the resources be successfully released.

It would however seem natural to me that a form or control should automatically be disposed of when there is no longer any programmatic reference to it.

Top
#208643 - 2014-03-02 04:16 PM Re: kixforms .net actually working for anyone? [Re: It_took_my_meds]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I agree. and honestly is so long ago that I can't remember but that if I recall correctly, that is how it is designed to work and should work.

now...
if you create form with controls like this:
$form = kixforms.form
$button = $form.button

disposing $form might not be able to clean $button as it still has an active reference.
still thinking aloud here. can you see if you have these extra references and does it have effect if you first null them out or othewise remove the reference?
_________________________
!

download KiXnet

Top
#208646 - 2014-03-02 10:41 PM Re: kixforms .net actually working for anyone? [Re: Lonkero]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
All my forms are created from within functions (with properly dimmed variables) and they have their own event loop at the bottom that exits when the form or any of its parents are closed. When the loop (and therefore the function exits) all variables relating to the form are cleaned up by the KiXtart interpreter.

On a side note, when you have multiple forms open, the events of all the forms are being processed in the query loop of the last opened form.

Top
Page 2 of 3 <123>


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

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.078 seconds in which 0.027 seconds were spent on a total of 15 queries. Zlib compression enabled.

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