Announcement

Collapse
No announcement yet.

slow execution

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • startup
    replied
    you cant sort
    if you wont just get values then show image according to a value
    follow my solution

    or post apz for debug

    Leave a comment:


  • bertelu
    replied
    but with the lua function will i be able to sort the result?
    is a key point for me to sort the file based on a cell

    Leave a comment:


  • startup
    replied
    why not read the txt file directly with read file (lua function)
    (this make you read line by line)
    then use delemitedstringtotable function to get cells data ????

    Leave a comment:


  • bertelu
    started a topic slow execution

    slow execution

    Hi folks, i'm trying to build an app with AMS.
    starting from loading a CVS file into a grid, i'm sorting the grid, then read the
    within the cells i'm looking for certain values and based on their name i will set visible an image, setting the position.
    evrithing works fine till 10 row in the grid. after that the app is slowing down. any suggestion?

    thanks in advance

    Code:
    function disegna_rack ()
    Image.SetVisible("Rack1", true)
    Grid.Refresh("elenco")
    fondo=743
    lato=43
    Grid.LoadFromFile("Grid2", "AutoPlay\\Docs\\modality.txt")
    Grid.SetVisible("Grid2", false)
    iColumnCount = Grid.GetColumnCount("elenco");
    iRowCount = Grid.GetRowCount("elenco");
    for iThisRow = 0, iRowCount do
    		str_ThisCellText = String.Lower( Grid.GetCellText("elenco", iThisRow, 1));
    		str_nomehost = String.Upper( Grid.GetCellText("elenco", iThisRow, 3));
    		Etichetta_label = String.Concat("L_", str_ThisCellText);
    		nome_label=String.Concat("N_", str_ThisCellText);
    		Label.SetText(nome_label, str_nomehost)
    		
    		
    		dimensione = Image.GetSize(str_ThisCellText)
    		errore = Application.GetLastError();
            if errore == 0 then
            
            --dim_label=Label.GetSize(Etichetta_label)
    		--dim_labO=dim_label.Width
    		--dim_labV=dim_label.Height
    		--dimO=dimensione.Width
    		dimV=dimensione.Height
    		--posizione = Image.GetPos(str_ThisCellText)
    		--y=posizione.Y
    		if fondo - dimV < 80 then
    			fondo = 743
    			lato = 255
    			Image.SetVisible("Rack2", true)
    		end
    		fondo=fondo-dimV
    		
    		--Dialog.Message("", str_ThisCellText)
    		label_pos=fondo + (dimV/2) - 5
    		Image.SetPos(str_ThisCellText, lato, fondo)		
    		Label.SetPos(Etichetta_label,lato + 20 , label_pos)
    
    		Label.SetPos(nome_label,lato+60, label_pos)
    		Image.SetVisible(str_ThisCellText, true)
    		Label.SetVisible(Etichetta_label, true)
    		Label.SetVisible(nome_label, true)
    		end
    	end
    end
Working...
X
😀
🥰
🤢
😎
😡
👍
👎