Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » unsigned long / uint64 from Value type (Same issue different decade)
Re: unsigned long / uint64 from Value type [message #60439 is a reply to message #60428] Sat, 20 January 2024 03:01 Go to previous messageGo to previous message
EspressoMan is currently offline  EspressoMan
Messages: 13
Registered: April 2023
Location: New Zealand
Promising Member
Hi again Klugier
So I added the following section to CtrlLib.usc

	// cjm 2024-01-17 17:32:45
	// Effectively just copied from IntStr & EditInt64 above but changed types to uint64
	
	fn IntStr64(x)
	{
		return x == :IntNull || x < :DblNullLim ? "" : to_string(x); // :IntNull, :DblNullLimit ???
	}
	
	ctrl EditUint64
	{
		group "Input fields";
		>EditNotNull;
		uint64 Min;
		uint64 Max;
		
		PaintData(w) { PaintMinMax(w, "Uint64", IntStr64(.Min), IntStr64(.Max)); } // Note function name change
	}
	
	// cjm 2024-01-17 17:32:45


This compiles no problem. However, there's something a strange when I try to add the control to my Layout. Clearly the Paint process is not happy!

index.php?t=getfile&id=6894&private=0

Specifically, the PaintData(w) { PaintMinMax(... ); } is giving me the following error message in the console of Layout designer

...PaintData: lambda.PaintData(): PaintMinMax: IntStr64: lambda.IntStr64(): /opt/upp/uppsrc/CtrlLib/CtrlLib.usc(895,49): invalid values for comparison array < double

I have searched the site and forums and can find no reference to :IntNull and :DblNullLim

Can you please suggest what is happening? It's fairly obviously to do with the type of Min and Max being set as uint64

Thanks
Colin
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: plugin/Zip issue with UTF-8
Next Topic: Performance comparison of mmap+MemStream to FileIn
Goto Forum:
  


Current Time: Sun Aug 03 01:14:37 CEST 2025

Total time taken to generate the page: 0.07853 seconds