Перейти к содержанию
Fire Monkey от А до Я

Лидеры

  1. Brovin Yaroslav

    Brovin Yaroslav

    Администраторы


    • Баллы

      4

    • Постов

      2 124


  2. Равиль Зарипов (ZuBy)

    Равиль Зарипов (ZuBy)

    Модераторы


    • Баллы

      3

    • Постов

      2 517


  3. AngryOwl

    AngryOwl

    Пользователи


    • Баллы

      1

    • Постов

      394


  4. Alexander

    Alexander

    Пользователи


    • Баллы

      1

    • Постов

      116


Популярный контент

Показан контент с высокой репутацией 29.06.2016 во всех областях

  1. TThread.Synchronize; Вызывать из кода обработчика таймера Чтобы понять, как это происходит, нужно почитать о том, как работает UI Thread (например тут). В этой статье, как раз рассказывает, что такое лупер и как организуется "якобы многозадачность" (отрисовка, обработка событий и тд) в рамках одного треда. Синхронизация не передает контекст. В данном случае контекст привязан к потоку. Он является частью потока. Поэтому по сути, когда вы синхронизируете (по сути просто вызываете ваш код из лупера, то по сути вы уже работаете в контексте :-) Если заглянуть в исходники андроида: public final class Looper { // Вырезан код public static void loop() { final Looper me = myLooper(); if (me == null) { throw new RuntimeException("No Looper; Looper.prepare() wasn't called on this thread."); } final MessageQueue queue = me.mQueue; // Make sure the identity of this thread is that of the local process, // and keep track of what that identity token actually is. Binder.clearCallingIdentity(); final long ident = Binder.clearCallingIdentity(); for (;;) { Message msg = queue.next(); // might block if (msg == null) { // No message indicates that the message queue is quitting. return; } // This must be in a local variable, in case a UI event sets the logger Printer logging = me.mLogging; if (logging != null) { logging.println(">>>>> Dispatching to " + msg.target + " " + msg.callback + ": " + msg.what); } msg.target.dispatchMessage(msg); if (logging != null) { logging.println("<<<<< Finished to " + msg.target + " " + msg.callback); } // Make sure that during the course of dispatching the // identity of the thread wasn't corrupted. final long newIdent = Binder.clearCallingIdentity(); if (ident != newIdent) { Log.wtf(TAG, "Thread identity changed from 0x" + Long.toHexString(ident) + " to 0x" + Long.toHexString(newIdent) + " while dispatching to " + msg.target.getClass().getName() + " " + msg.callback + " what=" + msg.what); } msg.recycleUnchecked(); } } ///------------------------------ } То есть по сути это просто бесконечный цикл, в котором из очереди вытаскиваются задания и выполняются по очереди. Как только возникает событие, оно просто складывается в очередь, и лупер в UI треде его просто обрабатывает. Когда вы вызываете TThread.Synchronize, то в конечном итоге ваш код завернется в сообщение, которое будет вызвано из этого куска кода
    2 балла
  2. А вы после заполнения LV вызвали LV.Resize?
    1 балл
  3. Alexander

    3D приложение

    На FMX, с такими моделями, лучше не рассчитывать. Если принципиально Objectpascal, то используйте связку Delphi +glscene, либо Delphi + OpenGL
    1 балл
  4. если брать реализацию для андроида, то есть решение без сенсора в этой теме там в первом сообщении, вложение
    1 балл
  5. Эта реализация с Posix таймерами работает в отдельном треде. Который никак не связан с джава и андроидом. Поэтому, если вы хотите работать с сенсорами, вам достаточно синхронизировать вызов с главным тредом.
    1 балл
  6. скорей всего FindObject(sText) deprecated, попробуйте использовать FindDrawable(sText)
    1 балл
  7. Фух! Вот уж воистину. Бьёшься-бьёшься — не получается. Спросишь в интернете — и наведут на решение. Всё, что GetShared… не работает. Android 5.1 без карты памяти не хочет сохранять туда файл. У меня по крайней мере. Но очередной просмотр доступных методов у TPath навёл меня на вот какой: GetPublicPath. Описание от Embarcadero у него следующее: http://docwiki.embarcadero.com/Libraries/Berlin/en/System.IOUtils.TPath.GetPublicPath Собственно, судя по описанию, то, что нужно. Пробую. Не работает. На эмуляторе GetPublicPath возвращает пустую строку. Из описания: Расстроился. Но на всякий случай попробовал на реальном устройстве под Android 5.1. И о, чудо! GetPublicPath возвращает «/storage/sdcard0/Android/data/com.<ХХХХ.myappname>/files» и установка apk оттуда через Intent замечательно работает. Проводник тоже видит эту папку и файлы в ней. На Android 4.2 тоже работает. Всем большое спасибо!
    1 балл
  8. Brovin Yaroslav

    Product Roadmap Update

    Over the last few days, as we continue to execute on our global plans, we received some questions about our product Roadmap. Given that we have had two months since 10.1 Berlin, I think that it is appropriate to give a quick update. Our product managers will provide more details in the coming days and weeks and we are always available for 1:1 discussions with partners or customers. I personally find these very useful and energizing. In February, we provided a detailed view of our Product Roadmap… http://community.embarcadero.com/article/news/16211-embarcadero-rad-studio-2016-product-approach-and-roadmap-2. We continue to make excellent progress in all areas and the Roadmap remains largely unchanged. We are very happy with 10.1 Berlin. We could have made even more progress towards the IDE evolution, but we have received very positive feedback so far, so progress in most areas is great. As we expand the use of IDERA’s R&D Network (100s of developers around the world) we will accelerate the effort to deliver on this Roadmap. The development processes are different from what Embarcadero has used in the past (more structured outsourcing) and there is always room for improvement, but the progress to-date with VCL updates and other projects has instilled the team with confidence that we can continue to deliver on all product objectives. There are some nuances to the Roadmap that are interesting to note. I am even happier with the team’s decision to support the Linux development and push forward as aggressively as possible without compromising on quality. This is based on many, many customer and partner discussions. Allowing for a more robust and flexible back-end (more APIs and platforms) is critical to opening the architecture of Delphi applications. This is aligned with our investment in RAD Server, an effort that we plan to continue. The product team strongly believes that making Delphi applications easier to integrate with different dev technologies (e.g. JS clients) will be beneficial for Delphi developers, and removes the “niche” classification that has constrained us in the past. This is not an overnight transformation, but we are ready and able to invest in product to support this strategic direction. Another nuance that is important is our commitment to be more open and collaborative with our existing community of tech partners (different from our R&D Network). I have seen many amazing tech components built by our partners across the world. We need to make it easier for our customers to find and use these components. Especially in the mobile space, showcasing what developers can achieve with FMX is really exciting. This is aligned with the Roadmap published in February, but not something we called out specifically. There are technology and marketing aspects that will both continue to evolve in this area throughout the coming year. Finally our focus on expanding the user base is critical. In software, companies either grow or shrink. We are committed to growth! We are investing a lot in marketing to make sure that new developers are aware of our tools. Over the last quarter, we have touched over one million developers with marketing communications, in many cases several different communications. This process will take time, but the number of new customers even this quarter is encouraging. However, we will not be successful without product excellence and continued product investment, so our ability to deliver on and expand the Roadmap are key. I know that many of our MVPs and significant customers are not too shy to ask questions or criticize – It is critical for us to continue to receive this feedback, especially when this is specific to improving our products. Of course, we will not be able to address everything immediately, but our resources are expanding and our ability to accelerate high impact product improvements is going to be much better, so our confidence in the future of Embarcadero is high. Best, Atanas Просмотр полной статьи
    1 балл
  9. Доброго дня. Было нечто подобное, подробностей уже и не помню, но - как собирается Dll в релизе и в дебаге? Имеется ввиду статическая или динамическая линковка. Если они разные, то при работе с динамическим рантаймом все нормально, а вот когда собираете статически - вылазит ошибка - может чего переоптимизирует, или версии рантайма отличаются. Или попробуйте, чем черт не шутит, сменить соглашения о вызове, на cdecl к примеру
    1 балл
  10. Нужно использовать myObject.Release, а не Free. Только обратите внимание, что Release - это отложенное уничтожение, т.е. моментально компонент исчезает с формы, а вот уничтожится - после, когда-нибудь, когда до него дойдет очередь. Помимо этого, если ссылка на объект есть где-то в поле класса, то нужно заnil-ить ее, дабы уменьшить счетчик ссылок.
    1 балл
  11. Не в первый раз вижу эту тему... TGridPanelLayout - далеко не предпочтительный вариант. Совсем. У ListBox с его Item'ами намного больше возможностей. С [xenon54] соглашусь, но не полностью. ListView действительно хорош (для мобильной платформы), однако он намного сложнее. Примеры применения стилей для ListBoxItem (не сочтите за рекламу, так проще было... нащелкал скринов для примера): Везде - ListBox. На последнем скрине - всплывающие сообщения на экране. Реализовано так же - прозрачная форма, ListBox и Item'ы со своим стилем В ВИДЕ ПАНЕЛЕК )
    1 балл
Эта таблица лидеров рассчитана в Москва/GMT+03:00
×
×
  • Создать...