Modify

Opened 16 years ago

Closed 16 years ago

#385 closed Feature Request (Rejected)

Option for _ArrayDisplay()

Reported by: sulfurious Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: _ArrayDisplay Cc:

Description

I have seen a few versions of _ArrayDisplay(). It seems as the function gets faster code wise it becomes more cumbersome to use in developing a script.

Can we please think about an early option in the call that let's the resulting gui have a close button that is focused on default?

This way when using _ArrayDisplay($avArray, $optDBG, $OPT.. .. ..) to 'debug', you just have to hit the enter key. Very useful when stepping through an array and performing stringsplits or similar.

I have coded it up myself very simply just inserting a gui_focus and exitloop at the right spots. But it would be nice to just have it work in every future version.

Thank you.
Sul.

Attachments (0)

Change History (4)

comment:1 Changed 16 years ago by TicketCleanup

  • Version 3.2.12.0 deleted

Automatic ticket cleanup.

comment:2 follow-up: Changed 16 years ago by WeaponX

As a PHP programmer I don't have the option of debugging to individual popup windows. I am more comfortable dumping all arrays using print_r. This is a faster way of debugging.

;Dump array / nested array / variable to console with optional description
Func Debug($mVar, $sDescription = '', $iNestLevel = 0)
	If $sDescription <> '' Then ConsoleWrite('+' & $sDescription & @CRLF)
	
	$indent = ""
	For $X = 1 to $iNestLevel
		$indent &= @TAB
	Next
	
	;Show all elements of array with index
	If IsArray($mVar) Then
		For $X = 0 to UBound($mVar) - 1
			ConsoleWrite($indent & '['&$X&']: ')
			
			;Recursively display all nested arrays
			If IsArray($mVar[$X]) Then
				ConsoleWrite('Array' & @CRLF)
				Debug($mVar[$X], "", $iNestLevel+1)
			Else
				ConsoleWrite($mVar[$X] & @CRLF)
			EndIf
		Next
	Else
		ConsoleWrite($indent & $mVar & @CRLF)
	EndIf
	ConsoleWrite(@CRLF)
EndFunc

comment:3 in reply to: ↑ 2 Changed 16 years ago by Sulfurious

I am unsure of this wiki stuff, I think I am replying here.

WeaponX, thank you for that example. I am aware of using those kind of debug solutions, although rarely do. Most of my 'debugging' is really to just see how my arrays are looking, after different kinds of data manipulation. Or just to pop on up using _arraydisplay so I can see the results and change the script around at the same time. Maybe my use would not be the classical 'debug' as in find the line that is foul, so much as a script writing tool.

Hopefully I am using this ticket thing correctly here.

Thanks.
Sul.

comment:4 Changed 16 years ago by Valik

  • Resolution set to Rejected
  • Status changed from new to closed

Press the ESC key to dismiss the dialog. Closing as rejected.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.