Shell 17-03-2024, 10:24
Buenos días, feliz domingo!.

Gambas se ha actualizado a la 3.19.1

Novedades en Gambas 3.19.1
 
Cita: 
The main features of this release are the following:

    Huge interpreter optimizations, making it faster than Python, Perl and Java interpreters in all benchmarks!

    Support for the russian e2k architecture.

    Many enhancements to the IDE image editor.

    The IDE can generate AppImage packages.

    The IDE project tree filter is a lot faster.

    Add global shortcut to LinkedIn, following KDE merge request #1731.

    Support for computed GOTO and GOSUB.

    New Dec and Base$ functions for converting integers in any base.

    The database component now can retrieve the contents of a newly inserted record, provided that the database driver supports it.

    The gb.desktop component now uses the freedesktop portal by default if present.

    A new default icon theme named gambas-thin.

    Better Wayland support in GUI components.

    A new syntax highlighter component based on definition files: gb.highlight.

    Add wayland support to the gb.media and gb.media.form components, and fix many problems.

    Add support for the dict:// protocol in the gb.net.curl component.

Saludos

(17-03-2024, 10:24)Shell escribió: Huge interpreter optimizations, making it faster than Python, Perl and Java interpreters in all benchmarks!

Ejem...ejem..
alberto-moyano 17-03-2024, 01:51
Hola gente, tengo la siguiente función (que es una adaptación de un aporte de Tincho), la cuestión es que no obtengo error alguno, pero tampoco hace lo que espero.

En concreto, se supone que lee un directorio a través de un path (revisado que existe en otra función) y listar los archivos que encuentra en un menú existente en el formulario.

Código:
Public Sub ShowFilesMenu()

  Dim strPath As String

  strPath = rutaScriptsExternos
  ShowFilesMenuWithPath(strPath)

End

Public Sub ShowFilesMenuWithPath(strPath As String)

  ShowFilesMenuInternal(strPath)

End

Public Sub ShowFilesMenuInternal(strPath As String, Optional stxExt As String[], Optional bolRec As Boolean)

  Dim stxFiles As New String[]
  Dim strFile As String
  Dim i As Integer

  stxFiles = RListFiles(strPath, stxExt, bolRec)

  Dim oMenu As New FMain.Menu77 'indico el menú donde se mostrara el listado de archivos

  For Each strFile In stxFiles
    Dim oMenuItem As Menu77
    oMenuItem = oMenu.Add(MenuFileFromPath(strFile))
    oMenuItem.Tag = strFile
    Connection(oMenuItem, "Activate", Me, "OpenFile")
  Next

End

Public Sub OpenFile(sender As Object)

  Dim strFilePath As String

  strFilePath = Sender.Tag

End

Private Function MenuFileFromPath(strFilePath As String) As String
  ' Esta función toma un camino completo de un archivo
  ' y devuelve solo el nombre del archivo para mostrar en el menú.

  Dim strFile As String

  strFile = File.Name(strFilePath)
  Return strFile

End

Public Function RListFiles(strPath As String, Optional stxExt As String[], Optional bolRec As Boolean) As String[]

  Dim stxTmp As New String[]
  Dim stxFiles As New String[]
  Dim strFile As String
  Dim strExt As String

  stxTmp.Clear
  stxFiles.Clear

  strPath = ArrangePath(strPath)

  Select Stat(strPath).Type
    Case gb.File
      strPath = File.Dir(strPath)
  End Select

  If stxExt <> Null Then
    Select stxExt.Count
      Case 0
        If bolRec = True Then
          stxTmp.Insert(RDir(strPath, "*.py"))
        Else
          stxTmp.Insert(Dir(strPath, "*.py", gb.File))
        Endif

      Case Else
        For Each strExt In stxExt
          If bolRec = True Then
            stxTmp.Insert(RDir(strPath, "*." & strExt))
          Else
            stxTmp.Insert(Dir(strPath, "*." & strExt, gb.File))
          Endif
        Next

    End Select
  Else

    If bolRec = True Then
      stxTmp.Insert(RDir(strPath, "*.py"))
    Else
      stxTmp.Insert(Dir(strPath, "*.py", gb.File))
    Endif
  Endif

  For Each strFile In stxTmp
    Select Stat(strPath &/ strFile).Type
      Case gb.File
        stxFiles.Add(strPath &/ strFile)
    End Select
  Next

  Return stxFiles

End

Public Function ArrangePath(strPath As String) As String

  If Right(strPath, 1) <> "/" Then
    strPath &= "/"
  Endif
  Return strPath

End

Alguna idea de por donde vienen los tiros
Shell 16-03-2024, 22:52
Buenas!.

Cuando tenemos tropecientos registros que se muestran en un GridView. Y mediante el ratón vamos
moviendo la barra de desplazamiento vertical, vamos a saltos. Hasta llegar a la parte inferior, superior, o
donde nos paremos. ¿ Y si queremos ir directamente hasta el último ?.

Si que se puede ir hasta el final de todos los registros, directamente.
Fijaros, pulsáis el botón derecho sobre la barra y aparecerá este menú.

[Imagen: WlJuNXS.png]

In English, of course. Usando Scroll here.  Te llevará hasta donde quieras, sin tener que ir a saltos.
Ese menú no está traducido. No me suena de haberlo visto antes. No parece algo fácil de ver.

Saludos
Páginas (560):    1 94 95 96 97 98 560   
Bienvenido, Invitado
Tienes que registrarte para poder participar en nuestro foro.
Recordarme?
Miembros: 288
Último miembro: shoUsho
Temas del foro: 1,729
Mensajes del foro: 8,987
Últimos temas
Paren...WAIT !!!
Foro: Aplicaciones/Fragmentos de Código
Último mensaje por: guizans, 25-08-2025, 14:49
Respuestas: 3 - Vistas: 458
GambOS
Foro: General
Último mensaje por: guizans, 20-08-2025, 13:58
Respuestas: 0 - Vistas: 318
Gambas y Wayland
Foro: General
Último mensaje por: guizans, 20-08-2025, 13:56
Respuestas: 6 - Vistas: 597
Odio a gb.Report
Foro: General
Último mensaje por: guizans, 19-08-2025, 10:40
Respuestas: 8 - Vistas: 943
Powered By MyBB, © 2002-2025 MyBB Group.
Made with by Curves UI.