Jump to content

Search the Community

Showing results for tags 'solved'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 8 results

  1. Henry Olive

    Getting Excel Column Value

    Good Day, Night ..... ItemNoCol := Ord(ComboBox2.Text[1]) - Ord('A') + 1; QtyCol := Ord(ComboBox3.Text[1]) - Ord('A') + 1; DataStart := StrToInt(ComboBox4.Text); // Which column does data start in for Row := DataStart to ExcelRowsCount do begin ItemNo :=Trim(Sheet.Cells[Row, ItemNoCol]); if (ItemNo <>'') then if (Sheet.Cells [Row, QtyCol] <> '0') or (Sheet.Cells [Row, QtyCol] <> '') then // HERE i get invalid variant operation err.msg begin .... end; What am i doing wrong ? Thank You
  2. NecoArc

    Memory leak on parsing json

    I have a simple function where i call a json file from memory and then parse it on a FMX project procedure TPrincipal.Button3Click(Sender: TObject); var jsonstr:string; json :TJsonObject ; begin jsonstr:=TFile.ReadAllText(ExtractFilePath(paramstr(0))+'\jsonTeste.json', TEncoding.UTF8); json :=TJSONObject.ParseJSONValue(jsonstr) as TJSONObject; freeandNil(json); end; the json is a 449kb file so it's n ot a big one but when i execute the TJSONObject.ParseJSONValue(jsonstr) as TJSONObject command the memory of my aplication goes up in 20mb then when i execute freeandNil(json) the memory do not goes down those 20mb continues to weigh throughout the execution of the application when i close it, it present memory leaks on jsonObjects, jsonStrings, unicodeString etc. but like why????? i don't understand what is wrong and this seems to happend only with this json thanks for any help, the json file is attached. jsonTeste.json
  3. I have always been unable to find an answer to the following: The vertical line I point to in the image: Does it have a name? Can its horizontal position (width or column) be changed? Is it correct for what I think it is? When using Format Code (Ctrl-D), it makes all the code stay inside the limit of that column. Thanks in advance.
  4. Is there any way I can run the script without the main thread hanging? I can run the code in a stream, but I don't understand how it works to the end, because I can execute the code in PyCharm and everything works fine. For example, I initialize the stream directly inside the python script, put the code into it, but the Library telethon that performs the task throws the error "There is no current event loop" или "There is no current event loop in thread 'Thread-1 (main)'." или "There is no current event loop in thread 'Dummy-1'." In pycharm that work as def CreateConnect(path: str, proxy, api_hash, api_id, device=None, system=None, loop=None): TC = TelegramClient( api_hash=api_hash, api_id=api_id, session=path, timeout=60, device_model=device, system_version=system, proxy=proxy, loop=loop ) try: TC.connect() if TC.is_connected(): return TC else: return False except Exception as e: print(f'error {path}: {e}') return False def main(loop): asyncio.set_event_loop(loop) #... tg = CreateConnect(path=f'{accPath}\\{account}\\telethon.session', proxy=proxy, api_hash=settings['telethon']['api_hash'], api_id=settings['telethon']['api_id'], device=settings['telethon']['device_model'], system=settings['telethon']['system_version'], loop=loop ) if __name__ == '__main__': loop = asyncio.new_event_loop() p = threading.Thread(target=main, args=(loop,)) p.start() but in delphi, the Thread is initialized on top of the module, as I understood it
  5. Henry Olive

    Character Problem

    Good Day Delphi10, FB-3, SQLDataset, DataSetProvider, CDS, DataSource MasterTable TNAME Field.Value = 'A.Cap-' // There is - at the end When I insert a new record into the DetailTable my code is like below DetailTable.FieldByName('TNAME').asString := MasterTable.FieldByName('TNAME').asString; After Post & ApplyUpdate when i check releated record in the Database i see TNAME value in DetailTable is 'A.Cap' // No - at the end, There should have been 'A.Cap-' but in Database, MasterTable TNAME value = 'A.Cap-' // there is - at the end which is correct What is wrong ? Thank You
  6. Hi, An hour ago I've tried out CnPack's "Bug reporter" IDE enhancement. It did not go well, after I've clicked "send Email". (Lot's of AV errors, ca 100 / sec while tried to close Delphi 7.) Since than: If I click the green |> arrow or [F9] to start debugging >> it compiles the EXE fine, than starts the EXE normally! (without attaching the debugger process.) Tried to: - restart PC - disable some CnPack modules But nothing helps 😞 - Where is the Delphi "error LOG file"?
  7. LordJonas

    Amazon Linux 2

    Hi. I just created a Amazon Linux 2 virtual machine for development and testing. I'm able to connect via SSH, i installed PAServer and it's running normal. However, it's not possible for Delphi to connect to PAServer, even with all the information entered correct. Any clues ?
  8. LordJonas

    Incompatible types bug in D11.1

    I think i've just found a bug in Delphi 11.1.... In this piece of code i'm getting the error "E2010 Incompatible types: 'TShape' and 'Integer'" but if we take a closer look both types are Integer:
×