delphi-xe8

Delphi Saving/Loading Dynamic Arrays Failed

不打扰是莪最后的温柔 提交于 2019-12-12 08:59:05
问题 I think this will look like ' do my homework ' kind of a question, but I'm still at the ' copy code, use it and try to understand it ' phase, and this is the most active thing I know of for posting questions of this theme. I have a record: type Card = record Name: string; Up,Right,Left,Down,Mark: Single; IDNumber: Integer; end; And array of that record: var ArrayCard: array of Card; And I wanted to know how can a dynamic array of this kind be stored/loaded to/from a file. Tried using this

firemonkey add item to HorzScrollBox on the fly

妖精的绣舞 提交于 2019-12-12 05:28:33
问题 i have a Horizontal Scroll Box item on my form.after run the program i will get a json string that include the list of items that must be in Horizontal Scroll Box .and i must add them dynamically. for example i have this : after run the program in the ? area i must a a new image. i found the function : HorzScrollBox1.AddObject(); but a argument is required for this i have two question: 1)how can i add the new object to this? 2)can i clone an existing image and add it at the end of the list?

Delphi: How to make TButtons 3x3?

为君一笑 提交于 2019-12-12 04:30:57
问题 I've created multi TButtons. Problem is I'd like created buttons looks like 3x3. How to do that? Note: Buttons will be more! My code: procedure TForm1.CreateButtonsClick(Sender: TObject); var i:integer; B: TButton; begin for i:= 1 to 7 do begin B := TButton.Create(Self); B.Text := Format('Button %d', [i]); B.Parent := Self; B.Height := 23; B.Width := 100; B.Position.X:=25 + i* 105; B.Position.Y:=70; end; end; 回答1: Since you mentioned using a TGridLayout, here is some code which show how to

Delphi: write/read variables and records to/from file

北慕城南 提交于 2019-12-12 03:44:54
问题 Working on my project in XE8, i've faced a necessity to save and read custom project files, which store variables and records of different types. Initially, my approach to solving that problem seemed to work, but in actual project it proved faulty. My method for creating a file, storing a "Categories" record: var SavingStream: TFileStream; i,j: Integer; begin SavingStream:=TFileStream.Create('SAVE.test', fmCreate or fmOpenWrite or fmShareDenyWrite); SavingStream.Position:=0; i:=Length

How to code read sms messages from android kitkat Delphi XE8

孤街浪徒 提交于 2019-12-12 03:29:54
问题 I would appreciate some help in finding a working code for reading sms messages, on android kitkat. I am aware that the app has to be a default sms app with relevant permissions. I really don't want to annoy the user with any popup dialog requesting that the user manually selects the default sms app. I would like my app to perform as the default sms until its task is completed then return the setting to the original default sms that the user or factory has set, before using my app. Currently,

Black screen with Delphi XE8 Firemonkey + Android 4.4

十年热恋 提交于 2019-12-11 12:50:10
问题 Anybody got any idea why nu applications compiled on Delphi XE8 don't work on Android 4.4? Only black screen appears. It says it should be compatible with older Android versions. 回答1: Please try to create the new empty mobile project in XE8, copy the *.dpr *.pas and *.fmx files into the project folder and add them to the project in the IDE (remember about extra graphics, sound etc - check the deploy option for them). I had similar issue and the new project with completely unchanged source

Projects fail to start in iOS when adding XSuperObject

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 09:06:44
问题 I've already reported this directly to the X-SuperObject project, but I thought I may get more quality help on Stack Overflow. Using Delphi XE8, I have issues using XSuperObject on iOS Simulator (7.1, 8.1, 8.2 and 8.3). So I started an empty Firemonkey app, started adding some things which were in my prior project (at this point I didn't know what the issue was). All worked fine up until I added the latest XSuperObject and XSuperJSON units to my app. uses XSuperObject, XSuperJSON; Upon

how to draw nodes inline in TvirualTree?

风流意气都作罢 提交于 2019-12-11 04:22:12
问题 I am currently drawing some images inside Tvirtualdrawtree using on before paint. Here is my drawing code procedure TForm2.VDTAniBeforeCellPaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect); var Data: PAnimeData; NewRect: TRect; R: TRect; begin // if not Assigned(Node) then begin exit; end; Data := VDTAni.GetNodeData(Node); case Column of 0, 1 ,2, 3, 4, 5, 6, 7: begin

Opens the splashscreen then shuts down IOS Delphi XE8

白昼怎懂夜的黑 提交于 2019-12-11 03:35:22
问题 Good morning, I have installed Delphi XE8 on my computer with windows 7 X64, also I have a virtual machine with virtualbox with Yosemite (10.10) also I have the paserver 16.0 and Xcode version 6.3.1 (6S1002), the problem is that when I compiling with IOS simulator 8.3, does not work, get to compile perfectly but opens the splashscreen and then shuts down. I tried to reinstall xcode reinstall Mac, but everything remains the same. 回答1: On project source I put my Application on the main thread.

Delphi XE8 and Fatal Error F2039

北战南征 提交于 2019-12-10 14:14:12
问题 With XE8 update 1, Win 7 64 bit and a single component added to an otherwise empty folder I get: error: [dcc32 Fatal Error] F2039 could not create output file .\Win32\Debug\MountTest. The test will compile and run fine the first time but XE8 has to be shut down and restarted to compile again. The component is a gauge from Mitov Software. The component vendor say's that this is a known bug with no fix. If so its a showstopper and project end'r for me. Is it really the end of the line for